/*
 * Copyright 2011 Clean GWT
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.cleanform.gwt.chinesechess.shared.model;

import java.util.List;

import com.cleanform.gwt.reflect.client.Reflectable;

/**
 * The chess game.
 * 
 * @author Jess
 * @version 1.0
 * @since 1.0
 */
public class ChessGame implements Reflectable {

	public static final int MAX_GAME_OBSERVERS = 5;
	public static int ACTIVE_RED = 1;
	public static int ACTIVE_BLACK = -1;

	public static final int STATE_TERMINAL = 0;
	public static final int STATE_PROGRESSING = 1;

	private String gameid;
	private String desc;
	private String playerRed;
	private String playerBlack;
	private int active = ACTIVE_RED;
	private List<ChessMove> chessMoves;
	private transient List<String> observers;

	/**
	 * @return the gameid
	 */
	public String getGameid() {
		return gameid;
	}

	/**
	 * @param gameid the gameid to set
	 */
	public void setGameid(String gameid) {
		this.gameid = gameid;
	}

	/**
	 * @return the desc
	 */
	public String getDesc() {
		return desc;
	}

	/**
	 * @param desc the desc to set
	 */
	public void setDesc(String desc) {
		this.desc = desc;
	}

	/**
	 * @return the playerRed
	 */
	public String getPlayerRed() {
		return playerRed;
	}

	/**
	 * @param playerRed the playerRed to set
	 */
	public void setPlayerRed(String playerRed) {
		this.playerRed = playerRed;
	}

	/**
	 * @return the playerBlack
	 */
	public String getPlayerBlack() {
		return playerBlack;
	}

	/**
	 * @param playerBlack the playerBlack to set
	 */
	public void setPlayerBlack(String playerBlack) {
		this.playerBlack = playerBlack;
	}

	/**
	 * @return the active
	 */
	public int getActive() {
		return active;
	}

	/**
	 * @param active the active to set
	 */
	public void setActive(int active) {
		this.active = active;
	}

	/**
	 * @return the chessMoves
	 */
	public List<ChessMove> getChessMoves() {
		return chessMoves;
	}

	/**
	 * @param chessMoves the chessMoves to set
	 */
	public void setChessMoves(List<ChessMove> chessMoves) {
		this.chessMoves = chessMoves;
	}

	/**
	 * @return the observers
	 */
	public List<String> getObservers() {
		return observers;
	}

	/**
	 * @param observers the observers to set
	 */
	public void setObservers(List<String> observers) {
		this.observers = observers;
	}

	public ChessGame() {
	}

}
